extends Card

func init():
    att.atk = 1 #卡牌的攻击力
    att.maxHp = 1 #卡牌的生命值
    att.cry = 1 #卡牌的费用
    lv = 1 #卡牌的等级  2为蓝色 卓越  最高4 传说
    type = TYPE.CREATURE #卡牌类型
    camp = "m_hearthstone" #阵营
    name = "精灵弓箭手" #卡牌名称
    tab = "" #卡牌的类别标签
    dec = "战吼：造成1点伤害。" #卡牌的效果描述

func _connect():
    addSkill("k_zhanHou")

func _use(card,cell):
    if card != null :
        sys.scene.queueFunc(self,"eff",1.0,[card.getPos()]) # 触发特效
        hurtCard(card,1,false) # 造成伤害

func useSelIf(card,cell):
    if card != null:
        return true
    # 不触发战吼直接上场
    elif card == null && cell != null:
        return true
    else:
        return false

# 特效
func eff(pos):
    var eff = sys.scene.newEff("e_feiDang")
    eff.play("fei",false)
    eff.position = getPos()
    eff.lookAt(pos)
    eff.MoveTo(pos,2000,false)
    yield(eff,"onMoveEnd")
    sys.scene.funcTime = 0.0
    eff.lookAt()
    eff.play("bao")